package com.huibo.common;

import java.util.List;
import java.util.Map;

/**
 * 用来表示员工每天工作的类
 */
public class WorkForm {

    private Map<String, List<Integer>> day1;

    private Map<String, List<Integer>> day2;

    private Map<String, List<Integer>> day3;

    private Map<String, List<Integer>> day4;

    private Map<String, List<Integer>> day5;

    private Map<String, List<Integer>> day6;

    private Map<String, List<Integer>> day7;

    public WorkForm(Map<String, List<Integer>> day1, Map<String, List<Integer>> day2, Map<String, List<Integer>> day3, Map<String, List<Integer>> day4, Map<String, List<Integer>> day5, Map<String, List<Integer>> day6, Map<String, List<Integer>> day7) {
        this.day1 = day1;
        this.day2 = day2;
        this.day3 = day3;
        this.day4 = day4;
        this.day5 = day5;
        this.day6 = day6;
        this.day7 = day7;
    }

    public WorkForm(){}

    @Override
    public String toString() {
        return "WorkForm{" +
                "day1=" + day1 +
                ", day2=" + day2 +
                ", day3=" + day3 +
                ", day4=" + day4 +
                ", day5=" + day5 +
                ", day6=" + day6 +
                ", day7=" + day7 +
                '}';
    }

    public Map<String, List<Integer>> getDay(int day){
        if(day<1 || day>7) return null;

        switch (day){
            case 1:{
                return day1;
            }
            case 2:{
                return day2;
            }
            case 3:{
                return day3;
            }
            case 4:{
                return day4;
            }
            case 5:{
                return day5;
            }
            case 6:{
                return day6;
            }
            case 7:{
                return day7;
            }
            default:{
                return null;
            }
        }
    }

    public Map<String, List<Integer>> getDay1() {
        return day1;
    }

    public void setDay1(Map<String, List<Integer>> day1) {
        this.day1 = day1;
    }

    public Map<String, List<Integer>> getDay2() {
        return day2;
    }

    public void setDay2(Map<String, List<Integer>> day2) {
        this.day2 = day2;
    }

    public Map<String, List<Integer>> getDay3() {
        return day3;
    }

    public void setDay3(Map<String, List<Integer>> day3) {
        this.day3 = day3;
    }

    public Map<String, List<Integer>> getDay4() {
        return day4;
    }

    public void setDay4(Map<String, List<Integer>> day4) {
        this.day4 = day4;
    }

    public Map<String, List<Integer>> getDay5() {
        return day5;
    }

    public void setDay5(Map<String, List<Integer>> day5) {
        this.day5 = day5;
    }

    public Map<String, List<Integer>> getDay6() {
        return day6;
    }

    public void setDay6(Map<String, List<Integer>> day6) {
        this.day6 = day6;
    }

    public Map<String, List<Integer>> getDay7() {
        return day7;
    }

    public void setDay7(Map<String, List<Integer>> day7) {
        this.day7 = day7;
    }
}
